package com.avengers.mobile.testing;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;


import com.avengers.mobile.layer.dao.PedidoDao;
import com.avengers.mobile.layer.rest.PedidoRest;





@Transactional
public class PedidoTesting extends AbstractBaseUnitTest {

	@Autowired
	PedidoDao pedidoDao;
	
	@Autowired
	PedidoRest restPedido;

	@Test
	public void test() {		
		testingFindPedidoById();	
		testingRestPedidoById();
	}
	
	
	public void testingFindPedidoById(){
		
		try {
			Object param[]=new Object[1];
			param[0]=1;
			pedidoDao.findPedidoList(param);		
			} catch (Exception e) {			
				e.printStackTrace();
			}
	}
	
	public void testingRestPedidoById(){
		
		try {		
			System.out.println(restPedido.findPedidosList("1").getEntity());		
			} catch (Exception e) {			
				e.printStackTrace();
			}
	}

}
